<?php session_start();
	include('../controller/functions.php');
	include("functionImages.php");
	User::connection();

	$userArr	= array('admin');
	if(!in_array($_SESSION['user'],$userArr)) {
	User::validSession();

}
if ($_GET['q'] == 'logout') 
{
	User::user_logout();
		print '		
			<script type="text/javascript">		
			window.location = "../login_r.php";
			</script>
			';

}

$strError='';

if(!empty($_FILES['YourFile'])) { 

	$filename = $_FILES['YourFile']['name'];
	$uploaddir = 'upload/';
    $uploadd = 'PHNS ';
	$uploaddir = $uploaddir.$uploadd;
    if (move_uploaded_file($_FILES['YourFile']['tmp_name'], $uploaddir.$filename)) 
    {
        Redirect('createGallery.php');
    
        $strError='<font color="#F30"><b>Could not upload the file</b></font>';
    }
} 
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="shortcut icon" href="../images/fav.ico">
<link rel="icon" type="image/gif" href="../images/fav.ico">
<title>Upload Image</title>
	<link rel="stylesheet" href="../css/style2.css" type="text/css" charset="utf-8" />
    <link rel="stylesheet" href="../css/front.css" type="text/css" charset="utf-8" />
    <link rel="stylesheet" href="../css/general.css" type="text/css" charset="utf-8" />

<div id="page">
<div id="wrapper">
       <div class="header_top" id="header_top"> </div>
     </div>
      <div class="header2"></div> 
	<div class="header"><!--open logo --></div><!--end header -->
	<!-- close logo-->
<!-- hide the client inquiries php-->
    <?php
    echo '<div id="nav">';
    echo '<div class="underlinemenu">';
	include('menu_view.php');
	echo '</div>';
    echo '</div>';
	?>
  	 	  <div id="header_in"> <!--open header -->
   <p> </p>
    
    <table width="100%" height="56">
     <tr>
       <td width="317" align="left" class="date"> 
        <? User::oras(); ?>
        </td>
            
       <td width="388" align="right"><? User::showPic(); ?></td>
       <td width="279">&nbsp;&nbsp;<? User::showUser(); ?>        </td>
       </tr>
   </table>
     
  
    </div>
    <div id="ex">
    </div>
    
      <p> </p>
         <div id="body"> <!--open body -->
  		<div id="sidebar"> 
       <!--<div id="chef_ind"> open chef --><!--close welcome-->
<?php echo '<p class="more">';
 require('sideBar.php');    
echo'</p>';
?>

        <!--</div>-->
        
      </div>
      
      <div id="content"> 
 		<div id="container">
      	 <div class="post"><!--open booking -->
         <div class="post3">
          <h2>Gallery</h2> </div>
           <div class="desriptionHeader"> <!--open right-->
            <div class="post3"><!--open booking -->
            <div align="center" class="mainbox">
<table border=0 bgcolor="#EBF9B4"> 
<tr><td  width=15% valign=top>
</td></tr>
<tr><td>

<h3>Content Management Module</h3>
<br /><? print ($strError); ?>
<form method=post enctype="multipart/form-data" action="">
  <p>Your File:<BR>
    <input type=file name=YourFile size=50 class=cssborder>
    <BR>
    <BR>
    <input  class='btn' type=submit name=submit value="Upload">
  </p>
  <p>&nbsp;</p>
  <p><a href='createGallery.php' class="msgs">view upload pictures</a></p>
 
</form>

</td></tr>

</table>

	 	 </div><!--close booking -->
   		</div><!--close desc -->
    	</div> <!--close right-->
      <div class="clear">&nbsp;</div>
      </div>
      </div><!--close desc -->
       </div><!--close booking -->
       
 <!-- footer-->
 <?php 
	  echo '<div id="footer">';
     include('footer_view.php');
      echo '</div>';
	  ?>

    </div><!-- close body-->
</div><!-- close page-->
</body>
</html>